Exercises: Charts

You need to submit 3 histograms, 3 box plots, 3 bullet charts, and 3 additional charts of your choice (can be an existing chart type we’ve already done, but it must be done in a new way or it can be an entirely new chart type) using Tableau or PowerBI, Python and R using the data below (or your own datasets). You can also use D3. You can choose which library to use in Python or R, documentation is provided to help you decide and as you start to play around in the libraries, you will decide which you prefer.

Data source We are using dataset from Data Source URL file.

Data structure:

## 'data.frame':    234 obs. of  50 variables:
##  $ Country: Factor w/ 234 levels "Afghanistan",..: 10 1 5 2 156 7 221 8 9 4 ...
##  $ 1960   : num  36.4 52.2 54.4 40.9 32.3 ...
##  $ 1961   : num  35.2 52.2 54.4 40.3 31 ...
##  $ 1962   : num  33.9 52.2 54.3 39.6 29.6 ...
##  $ 1963   : num  32.5 52.2 54.2 38.8 28.2 ...
##  $ 1964   : num  31 52.2 54 37.9 26.8 ...
##  $ 1965   : num  29.5 52.2 53.8 37 25.5 ...
##  $ 1966   : num  28.1 52.1 53.6 36.1 24.3 ...
##  $ 1967   : num  26.7 52.1 53.3 35.2 23.2 ...
##  $ 1968   : num  25.5 52 53 34.4 22.2 ...
##  $ 1969   : num  24.5 51.9 52.7 33.7 21.5 ...
##  $ 1970   : num  23.7 51.8 52.4 32.9 20.9 ...
##  $ 1971   : num  23.1 51.7 52.1 32.3 20.6 ...
##  $ 1972   : num  22.6 51.5 52 31.6 20.5 ...
##  $ 1973   : num  22.3 51.4 51.9 31 20.5 ...
##  $ 1974   : num  22.2 51.2 51.9 30.3 20.7 ...
##  $ 1975   : num  22.1 51.1 51.9 29.7 20.9 ...
##  $ 1976   : num  22.1 51 52 29.1 21.1 ...
##  $ 1977   : num  22.2 50.9 52.2 28.6 21.2 ...
##  $ 1978   : num  22.3 50.8 52.3 28.1 21.2 ...
##  $ 1979   : num  22.4 50.8 52.4 27.7 21.2 ...
##  $ 1980   : num  22.4 50.8 52.6 27.4 21 ...
##  $ 1981   : num  22.4 50.8 52.6 27.1 20.7 ...
##  $ 1982   : num  22.3 50.9 52.7 26.9 20.4 ...
##  $ 1983   : num  22.2 51 52.8 26.6 20.1 ...
##  $ 1984   : num  22 51 52.8 26.4 19.9 ...
##  $ 1985   : num  21.7 51.1 52.9 26.2 19.6 ...
##  $ 1986   : num  21.3 51.2 52.9 25.9 19.5 ...
##  $ 1987   : num  20.9 51.2 52.9 25.6 19.5 ...
##  $ 1988   : num  20.4 51.3 52.9 25.2 19.5 ...
##  $ 1989   : num  19.9 51.4 52.8 24.8 19.6 ...
##  $ 1990   : num  19.4 51.5 52.7 24.3 19.7 ...
##  $ 1991   : num  18.8 51.6 52.5 23.8 19.6 ...
##  $ 1992   : num  18.3 51.7 52.1 23.2 19.5 ...
##  $ 1993   : num  17.8 51.8 51.7 22.6 19.2 ...
##  $ 1994   : num  17.4 51.8 51.1 21.9 18.7 ...
##  $ 1995   : num  16.9 51.8 50.5 21.2 18.2 ...
##  $ 1996   : num  16.5 51.8 49.9 20.4 17.5 ...
##  $ 1997   : num  16 51.6 49.4 19.5 16.9 ...
##  $ 1998   : num  15.5 51.5 49 18.6 16.3 ...
##  $ 1999   : num  15 51.2 48.7 17.7 15.8 ...
##  $ 2000   : num  14.5 50.9 48.4 16.9 15.4 ...
##  $ 2001   : num  14 50.5 48 16.1 15.1 ...
##  $ 2002   : num  13.6 50 47.5 15.4 14.8 ...
##  $ 2003   : num  13.2 49.4 46.9 15 14.6 ...
##  $ 2004   : num  12.8 48.8 46.2 14.6 14.3 ...
##  $ 2005   : num  12.4 48.2 45.3 14.5 14.1 ...
##  $ 2006   : num  12.2 47.6 44.4 14.5 13.8 ...
##  $ 2007   : num  11.9 47 43.6 14.5 13.5 ...
##  $ 2008   : num  11.7 46.5 42.9 14.6 13.3 ...
## 'data.frame':    52 obs. of  8 variables:
##  $ state              : Factor w/ 52 levels "Alabama ","Alaska ",..: 45 1 2 3 4 5 6 7 8 9 ...
##  $ murder             : num  5.6 8.2 4.8 7.5 6.7 6.9 3.7 2.9 4.4 35.4 ...
##  $ forcible_rape      : num  31.7 34.3 81.1 33.8 42.9 26 43.4 20 44.7 30.2 ...
##  $ robbery            : num  140.7 141.4 80.9 144.4 91.1 ...
##  $ aggravated_assault : num  291 248 465 327 387 ...
##  $ burglary           : num  727 954 622 948 1085 ...
##  $ larceny_theft      : num  2286 2650 2599 2965 2711 ...
##  $ motor_vehicle_theft: num  417 288 391 924 262 ...
## 'data.frame':    52 obs. of  7 variables:
##  $ state                : Factor w/ 52 levels "Alabama","Alaska",..: 45 1 2 3 4 5 6 7 8 9 ...
##  $ reading              : int  501 557 520 516 572 500 568 509 495 466 ...
##  $ math                 : int  515 552 516 521 572 513 575 513 498 451 ...
##  $ writing              : int  493 549 492 497 556 498 555 512 484 461 ...
##  $ percent_graduates_sat: int  46 7 46 26 5 49 20 83 71 79 ...
##  $ pupil_staff_ratio    : num  7.9 6.7 7.9 10.4 6.8 10.9 8.1 6.6 7.9 6.3 ...
##  $ dropout_rate         : num  4.4 2.3 7.3 7.6 4.6 5.5 6.9 2.1 5.5 7.1 ...

Construct Charts:

Histogram

Box Plot

Bullet Chart